﻿using Timers;
using UnityEngine;

namespace Entity
{
    public class EnemyAttack : Attack
    {
        protected override void SubAttackAction(Collider2D other)
        {
            var damageable = other.GetComponent<Damageable>();
            damageable.TakeDamage(1);
            TimersManager.SetTimer(this, 1, CanAttack);
            _canAttack = false;
        }
    }
}